<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    for(var num = 1; num <= 10000;num ++){
        for(var i = 2;i < num ;i++){
            if(num % i == 0){
                break;
            } 
            if(i == num - 1){
                console.log(num)
            }
        }
    }
</script>
</html>